Function Reference
Checksum
Syntax:
wwstring:Checksum($value)
Parameters:
Name
Type
Description
value
string
 
Returns:
string:

CreateBlake2bHash
Generates a deterministic, keyed BLAKE2b hash from the provided string parts and returns it as a lowercase hexadecimal string. The parts are escaped and joined with ':' before hashing. The specifies the length of the hash in characters, producing a hex string of size hash length.
Syntax:
wwstring:CreateBlake2bHash($hashLength, $parts)
wwstring:CreateBlake2bHash($hashLength, $part1)
wwstring:CreateBlake2bHash($hashLength, $part1, $part2)
wwstring:CreateBlake2bHash($hashLength, $part1, $part2, $part3)
Overloads:
#
Parameters
1
hashLength, parts
2
hashLength, part1
3
hashLength, part1, part2
4
hashLength, part1, part2, part3
Parameters:
Name
Type
Description
hashLength
int
 
parts
string[]
 
part1
string
 
part2
string
 
part3
string
 
Returns:
string:

CSSClassName
Convert the given string into a valid CSS class name.
Syntax:
wwstring:CSSClassName($styleName)
Parameters:
Name
Type
Description
styleName
string
Name of the style.
Returns:
string: A string.
Example:

<xsl:value-of select="wwstring:CSSClassName('Blue_Moon.Detective;Agency')" />

DecodeURI
Decode an escaped URI 'value' back to an unescaped URI.
Syntax:
wwstring:DecodeURI($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.

DecodeURIComponent
Decode an escaped partial URI component, 'value', back to an unescaped URI component.
Syntax:
wwstring:DecodeURIComponent($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.

EclipseId
Create a valid Eclipse ID from 'identifier'.
Syntax:
wwstring:EclipseId($identifier)
Parameters:
Name
Type
Description
identifier
string
The identifier.
Returns:
string: A string.

EncodeURI
Encode 'value' string as an escaped URI.
Syntax:
wwstring:EncodeURI($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.

EncodeURIComponent
Encode 'value' string, a partial URI component, as an escaped URI.
Syntax:
wwstring:EncodeURIComponent($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.

EndsWith
Return success of suffix being the suffix of input
Syntax:
wwstring:EndsWith($input, $suffix)
Parameters:
Name
Type
Description
input
string
The input.
suffix
string
The suffix.
Returns:
bool: True if match found, false otherwise.
Example:

<xsl:value-of select="wwstring:EndsWith('webworks.scss', '.scss')" />

EscapeForXMLAttribute
Escape 'value' string so that it can be written as an XML attribute.
Syntax:
wwstring:EscapeForXMLAttribute($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.
Example:

<html:div onClick="{wwstring:EscapeForXMLAttribute('alert(\'Boo!\');')}">
Click me!
</html:div>

Format
Format a message using the C# string formatter.
Syntax:
wwstring:Format($format, $argument1)
wwstring:Format($format, $argument1, $argument2)
wwstring:Format($format, $argument1, $argument2, $argument3)
wwstring:Format($format, $argument1, $argument2, $argument3, $argument4)
wwstring:Format($format, $argument1, $argument2, $argument3, $argument4, $argument5)
wwstring:Format($format, $argument1, $argument2, $argument3, $argument4, $argument5, $argument6)
wwstring:Format($format, $argument1, $argument2, $argument3, $argument4, $argument5, $argument6, $argument7)
wwstring:Format($format, $argument1, $argument2, $argument3, $argument4, $argument5, $argument6, $argument7, $argument8)
wwstring:Format($format, $argument1, $argument2, $argument3, $argument4, $argument5, $argument6, $argument7, $argument8, $argument9)
wwstring:Format($format, $argument1, $argument2, $argument3, $argument4, $argument5, $argument6, $argument7, $argument8, $argument9, $argument10)
Overloads:
#
Parameters
1
format, argument1
2
format, argument1, argument2
3
format, argument1, argument2, argument3
4
format, argument1, argument2, argument3, argument4
5
format, argument1, argument2, argument3, argument4, argument5
6
format, argument1, argument2, argument3, argument4, argument5, argument6
7
format, argument1, argument2, argument3, argument4, argument5, argument6, argument7
8
format, argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8
9
format, argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8, argument9
10
format, argument1, argument2, argument3, argument4, argument5, argument6, argument7, argument8, argument9, argument10
Parameters:
Name
Type
Description
format
string
Describes the format to use.
argument1
string
The first argument.
argument2
string
The second argument.
argument3
string
The third argument.
argument4
string
The fourth argument.
argument5
string
The fifth argument.
argument6
string
The argument 6.
argument7
string
The argument 7.
argument8
string
The argument 8.
argument9
string
The argument 9.
argument10
string
The argument 10.
Returns:
string: The formatted value.
Example:

<xsl:value-of select="wwstring:Format('{0} total', 17)" />

FromFile
Import file contents using 'sourceFileEncodingName' as the file's assumed encoding.
Syntax:
wwstring:FromFile($sourceFilePath, $sourceFileEncodingName)
Parameters:
Name
Type
Description
sourceFilePath
string
Full pathname of the source file.
sourceFileEncodingName
string
Name of the source file encoding.
Returns:
string: A string.
Example:

<xsl:value-of select="wwstring:FromFile('C:\myfile.txt', 'UTF-8')" />

JavaScriptEncoding
Convert all non-ASCII characters to Unicode escape sequences. Also convert all ASCII characters less than 32 along with problematic escape characters, i.e. , to Unicode escape sequences.
Syntax:
wwstring:JavaScriptEncoding($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.
Example:

<xsl:value-of select="wwstring:JavaScriptEncoding('Hello\nworld!\n')" />

MatchExpression
Return success of match for 'matchExpressionAsString' in 'input'.
Syntax:
wwstring:MatchExpression($input, $matchExpressionAsString)
Parameters:
Name
Type
Description
input
string
The input.
matchExpressionAsString
string
The match expression as string.
Returns:
bool: True if match found, false otherwise.
Example:

<xsl:value-of select="wwstring:Replace('<letter>scar's <letter>nly <letter>strich <letter>iled an <letter>range <letter>wl t<letter>day.', '<letter>', 'o')" />

MatchExpressionValue
Return value of match for 'matchExpressionAsString' in 'input'.
Syntax:
wwstring:MatchExpressionValue($input, $matchExpressionAsString)
Parameters:
Name
Type
Description
input
string
The input.
matchExpressionAsString
string
The match expression as string.
Returns:
string: String.
Example:

<xsl:value-of select="wwstring:MatchExpressionValue('The end of aa sentenceaaaaalways leaves me sad.', 'a{3-4}')" />

MD5Checksum
Compute the MD5 checksum on the given 'value' string.
Syntax:
wwstring:MD5Checksum($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.
Example:
<xsl:value-of select="wwstring:MD5Checksum('A long time ago, way back in history, when all there was to drink, was nothing but cups \'o tea.')" />

NCNAME
Convert 'identifier' to a valid NCNAME as defined by:
http://www.w3.org/TR/1999/REC-xml-names-19990114/#NT-NCNameChar.
Syntax:
wwstring:NCNAME($identifier)
Parameters:
Name
Type
Description
identifier
string
The identifier.
Returns:
string: A string.
Example:

<xsl:value-of select="wwstring:NCNAME($VarTable/@id)" />

NormalizeQuotes
Convert the given string to a string where all left/right single/double quotes are normalized. Left single quotation mark = single quotation mark Right single quotation mark = single quotation mark Left double quotation mark = double quotation mark Right double quotation mark = double quotation mark
Syntax:
wwstring:NormalizeQuotes($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: String.
Example:
<xsl:value-of select="wwstring:NormalizeQuotes('string-with-left-right-quote-marks...')" />

OEBClassName
Create a valid Open eBook class name from 'styleName'.
Syntax:
wwstring:OEBClassName($styleName)
Parameters:
Name
Type
Description
styleName
string
Name of the style.
Returns:
string: A string.

PalmReaderEncoding
Encode string as required by Palm Reader.
Syntax:
wwstring:PalmReaderEncoding($encodingName, $value)
Parameters:
Name
Type
Description
encodingName
string
Name of the encoding.
value
string
The value.
Returns:
string: A string.

Replace
Replace all occurrences of 'search' in 'input' with 'replacement'.
Syntax:
wwstring:Replace($input, $search, $replacement)
Parameters:
Name
Type
Description
input
string
The input.
search
string
The search.
replacement
string
The replacement.
Returns:
string: Result String.
Example:

<xsl:value-of select="wwstring:Replace('<letter>scar's <letter>nly <letter>strich <letter>iled an <letter>range <letter>wl t<letter>day.', '<letter>', 'o')" />

ReplaceWithExpression
Replace all occurrences of 'searchExpressionAsString' in 'input' with 'replacement'.
Syntax:
wwstring:ReplaceWithExpression($input, $searchExpressionAsString, $replacement)
Parameters:
Name
Type
Description
input
string
The input.
searchExpressionAsString
string
The search expression as string.
replacement
string
The replacement.
Returns:
string: String.
Example:

<xsl:value-of select="wwstring:ReplaceWithExpression('The end of aa sentenceaaaaalways leaves me sad.', 'a{3-4}', '. ')" />

ReplaceWithExpressionForCount
Replace 'count' occurrences of 'searchExpressionAsString' in 'input' with 'replacement'.
Syntax:
wwstring:ReplaceWithExpressionForCount($input, $searchExpressionAsString, $replacement, $count)
Parameters:
Name
Type
Description
input
string
The input.
searchExpressionAsString
string
The search expression as string.
replacement
string
The replacement.
count
int
Number of.
Returns:
string: A string.
Example:

<xsl:value-of select="wwstring:ReplaceWithExpression('The end of aa sentenceaaaaalways leaves me sad.', 'a{3-4}', '. ', 1)" />

SHA1Checksum
Compute the SHA-1 (Secure Hash Algorithm 1) checksum on the given 'value' string.
Syntax:
wwstring:SHA1Checksum($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: A string.
Example:
<xsl:value-of select="wwstring:SHA1Checksum('A long time ago, way back in history, when all there was to drink, was nothing but cups \'o tea.')" />

ToCamel
Convert the given string to camel case.
Syntax:
wwstring:ToCamel($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: String.
Example:
<xsl:value-of select="wwstring:ToCamel('camel case')" />

ToLower
Convert the given string to lowercase.
Syntax:
wwstring:ToLower($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: String.
Example:
<xsl:value-of select="wwstring:ToLower('UppERcAse')" />

ToPascal
Convert the given string to pascal case.
Syntax:
wwstring:ToPascal($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: String.
Example:
<xsl:value-of select="wwstring:ToPascal('pascal case')" />

ToUpper
Convert the given string to uppercase.
Syntax:
wwstring:ToUpper($value)
Parameters:
Name
Type
Description
value
string
The value.
Returns:
string: String.
Example:
<xsl:value-of select="wwstring:ToUpper('lOwErcAsE')" />

WebWorksHelpContextOrTopic
Converts the given 'key' into a valid WebWorks Help/Reverb context or topic string.
Note: WebWorks Help/Reverb context and topic strings may only contain the characters A-Z, a-z, 0-9, and _.
Syntax:
wwstring:WebWorksHelpContextOrTopic($key)
Parameters:
Name
Type
Description
key
string
The key.
Returns:
string: A string.
Example:

<xsl:value-of select="wwstring:WebWorksHelpContextOrTopic('A long time...')" />

Was this helpful?
Last modified date: 01/12/2026